home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 208 < prev    next >
Encoding:
Text File  |  1996-08-05  |  986 b   |  40 lines

  1. Newsgroups: comp.lang.c
  2. Path: newsfeed.internetmci.com!iglou!iglou2!quare
  3. From: quare@iglou2.iglou.com (quare)
  4. Subject: Re: EMM386 Problem - main.c (0/1)
  5. X-Nntp-Posting-Host: iglou2
  6. Message-ID: <DKLGBy.Is7@iglou.com>
  7. Sender: news@iglou.com (News Administrator)
  8. Organization: IgLou Internet Services (1-800-436-4456)
  9. X-Newsreader: TIN [version 1.2 PL2]
  10. References: <4c9o94$640@zeke.ebtech.net> <4cc776$dah@gatekeeper.cng.com> <4cd3mb$cfo@zeke.ebtech.net>
  11. Date: Wed, 3 Jan 1996 07:19:10 GMT
  12.  
  13. Paul Anderson (panderso@ebtech.net) wrote:
  14.  
  15. [snip]
  16.  
  17. > int loadcnf(FILE *in)
  18. > {
  19. >         char indata[40];
  20. >         int tmp;
  21. >         /* Struct defed in menu.h... */
  22. >         fscanf(in,"%s", &indata);
  23. >         if (indata=="ON")
  24. >                 {
  25. >                 tmp=1;
  26.  
  27. You are passing a pointer to a pointer to char with &indata.  fscanf() 
  28. calls for a pointer to specified type.  You can append [0] to &indata
  29. or simply remove the referencing operator.
  30.  
  31. Read the faq.
  32.  
  33.  
  34.  
  35.  
  36.  
  37. -- 
  38. !quare 
  39.  
  40.